package com.together.sfipp.service.impl;

import com.together.sfipp.mapper.RulesMapper;
import com.together.sfipp.pojo.Rules;
import com.together.sfipp.service.RulesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RulesServiceImpl implements RulesService{
    @Autowired
    private RulesMapper rulesMapper;

    @Override
    public Rules findByRulesName(String rulesName) {
        Rules r = rulesMapper.findByRulesName(rulesName);
        return r;
    }

    @Override
    public void insert(Rules rules) {
        rulesMapper.insert(rules);
    }

    @Override
    public void delete(Integer rulesId) {
        rulesMapper.delete(rulesId);
    }

    @Override
    public void update(Rules rules) {
        rulesMapper.update(rules);
    }

    @Override
    public List<Rules> selectAll() {
        return rulesMapper.selectAll();
    }
}
